/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: eventmesh-cloudevents.proto

package org.apache.eventmesh.common.protocol.grpc.cloudevents;

/**
 * Protobuf type {@code org.apache.eventmesh.cloudevents.v1.CloudEvent}
 */
public final class CloudEvent extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:org.apache.eventmesh.cloudevents.v1.CloudEvent)
    CloudEventOrBuilder {
private static final long serialVersionUID = 0L;
  // Use CloudEvent.newBuilder() to construct.
  private CloudEvent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private CloudEvent() {
    id_ = "";
    source_ = "";
    specVersion_ = "";
    type_ = "";
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new CloudEvent();
  }

  @Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private CloudEvent(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            String s = input.readStringRequireUtf8();

            id_ = s;
            break;
          }
          case 18: {
            String s = input.readStringRequireUtf8();

            source_ = s;
            break;
          }
          case 26: {
            String s = input.readStringRequireUtf8();

            specVersion_ = s;
            break;
          }
          case 34: {
            String s = input.readStringRequireUtf8();

            type_ = s;
            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              attributes_ = com.google.protobuf.MapField.newMapField(
                  AttributesDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000001;
            }
            com.google.protobuf.MapEntry<String, CloudEventAttributeValue>
            attributes__ = input.readMessage(
                AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            attributes_.getMutableMap().put(
                attributes__.getKey(), attributes__.getValue());
            break;
          }
          case 50: {
            data_ = input.readBytes();
            dataCase_ = 6;
            break;
          }
          case 58: {
            String s = input.readStringRequireUtf8();
            dataCase_ = 7;
            data_ = s;
            break;
          }
          case 66: {
            com.google.protobuf.Any.Builder subBuilder = null;
            if (dataCase_ == 8) {
              subBuilder = ((com.google.protobuf.Any) data_).toBuilder();
            }
            data_ =
                input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.protobuf.Any) data_);
              data_ = subBuilder.buildPartial();
            }
            dataCase_ = 8;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 5:
        return internalGetAttributes();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            CloudEvent.class, Builder.class);
  }

  public interface CloudEventAttributeValueOrBuilder extends
      // @@protoc_insertion_point(interface_extends:org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>bool ce_boolean = 1;</code>
     * @return Whether the ceBoolean field is set.
     */
    boolean hasCeBoolean();
    /**
     * <code>bool ce_boolean = 1;</code>
     * @return The ceBoolean.
     */
    boolean getCeBoolean();

    /**
     * <code>int32 ce_integer = 2;</code>
     * @return Whether the ceInteger field is set.
     */
    boolean hasCeInteger();
    /**
     * <code>int32 ce_integer = 2;</code>
     * @return The ceInteger.
     */
    int getCeInteger();

    /**
     * <code>string ce_string = 3;</code>
     * @return Whether the ceString field is set.
     */
    boolean hasCeString();
    /**
     * <code>string ce_string = 3;</code>
     * @return The ceString.
     */
    String getCeString();
    /**
     * <code>string ce_string = 3;</code>
     * @return The bytes for ceString.
     */
    com.google.protobuf.ByteString
        getCeStringBytes();

    /**
     * <code>bytes ce_bytes = 4;</code>
     * @return Whether the ceBytes field is set.
     */
    boolean hasCeBytes();
    /**
     * <code>bytes ce_bytes = 4;</code>
     * @return The ceBytes.
     */
    com.google.protobuf.ByteString getCeBytes();

    /**
     * <code>string ce_uri = 5;</code>
     * @return Whether the ceUri field is set.
     */
    boolean hasCeUri();
    /**
     * <code>string ce_uri = 5;</code>
     * @return The ceUri.
     */
    String getCeUri();
    /**
     * <code>string ce_uri = 5;</code>
     * @return The bytes for ceUri.
     */
    com.google.protobuf.ByteString
        getCeUriBytes();

    /**
     * <code>string ce_uri_ref = 6;</code>
     * @return Whether the ceUriRef field is set.
     */
    boolean hasCeUriRef();
    /**
     * <code>string ce_uri_ref = 6;</code>
     * @return The ceUriRef.
     */
    String getCeUriRef();
    /**
     * <code>string ce_uri_ref = 6;</code>
     * @return The bytes for ceUriRef.
     */
    com.google.protobuf.ByteString
        getCeUriRefBytes();

    /**
     * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
     * @return Whether the ceTimestamp field is set.
     */
    boolean hasCeTimestamp();
    /**
     * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
     * @return The ceTimestamp.
     */
    com.google.protobuf.Timestamp getCeTimestamp();
    /**
     * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
     */
    com.google.protobuf.TimestampOrBuilder getCeTimestampOrBuilder();

    public CloudEventAttributeValue.AttrCase getAttrCase();
  }
  /**
   * Protobuf type {@code org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue}
   */
  public static final class CloudEventAttributeValue extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue)
      CloudEventAttributeValueOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use CloudEventAttributeValue.newBuilder() to construct.
    private CloudEventAttributeValue(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private CloudEventAttributeValue() {
    }

    @Override
    @SuppressWarnings({"unused"})
    protected Object newInstance(
        UnusedPrivateParameter unused) {
      return new CloudEventAttributeValue();
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private CloudEventAttributeValue(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              attr_ = input.readBool();
              attrCase_ = 1;
              break;
            }
            case 16: {
              attr_ = input.readInt32();
              attrCase_ = 2;
              break;
            }
            case 26: {
              String s = input.readStringRequireUtf8();
              attrCase_ = 3;
              attr_ = s;
              break;
            }
            case 34: {
              attr_ = input.readBytes();
              attrCase_ = 4;
              break;
            }
            case 42: {
              String s = input.readStringRequireUtf8();
              attrCase_ = 5;
              attr_ = s;
              break;
            }
            case 50: {
              String s = input.readStringRequireUtf8();
              attrCase_ = 6;
              attr_ = s;
              break;
            }
            case 58: {
              com.google.protobuf.Timestamp.Builder subBuilder = null;
              if (attrCase_ == 7) {
                subBuilder = ((com.google.protobuf.Timestamp) attr_).toBuilder();
              }
              attr_ =
                  input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.google.protobuf.Timestamp) attr_);
                attr_ = subBuilder.buildPartial();
              }
              attrCase_ = 7;
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_CloudEventAttributeValue_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_CloudEventAttributeValue_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              CloudEventAttributeValue.class, Builder.class);
    }

    private int attrCase_ = 0;
    private Object attr_;
    public enum AttrCase
        implements com.google.protobuf.Internal.EnumLite,
            InternalOneOfEnum {
      CE_BOOLEAN(1),
      CE_INTEGER(2),
      CE_STRING(3),
      CE_BYTES(4),
      CE_URI(5),
      CE_URI_REF(6),
      CE_TIMESTAMP(7),
      ATTR_NOT_SET(0);
      private final int value;
      private AttrCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @Deprecated
      public static AttrCase valueOf(int value) {
        return forNumber(value);
      }

      public static AttrCase forNumber(int value) {
        switch (value) {
          case 1: return CE_BOOLEAN;
          case 2: return CE_INTEGER;
          case 3: return CE_STRING;
          case 4: return CE_BYTES;
          case 5: return CE_URI;
          case 6: return CE_URI_REF;
          case 7: return CE_TIMESTAMP;
          case 0: return ATTR_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public AttrCase
    getAttrCase() {
      return AttrCase.forNumber(
          attrCase_);
    }

    public static final int CE_BOOLEAN_FIELD_NUMBER = 1;
    /**
     * <code>bool ce_boolean = 1;</code>
     * @return Whether the ceBoolean field is set.
     */
    @Override
    public boolean hasCeBoolean() {
      return attrCase_ == 1;
    }
    /**
     * <code>bool ce_boolean = 1;</code>
     * @return The ceBoolean.
     */
    @Override
    public boolean getCeBoolean() {
      if (attrCase_ == 1) {
        return (Boolean) attr_;
      }
      return false;
    }

    public static final int CE_INTEGER_FIELD_NUMBER = 2;
    /**
     * <code>int32 ce_integer = 2;</code>
     * @return Whether the ceInteger field is set.
     */
    @Override
    public boolean hasCeInteger() {
      return attrCase_ == 2;
    }
    /**
     * <code>int32 ce_integer = 2;</code>
     * @return The ceInteger.
     */
    @Override
    public int getCeInteger() {
      if (attrCase_ == 2) {
        return (Integer) attr_;
      }
      return 0;
    }

    public static final int CE_STRING_FIELD_NUMBER = 3;
    /**
     * <code>string ce_string = 3;</code>
     * @return Whether the ceString field is set.
     */
    public boolean hasCeString() {
      return attrCase_ == 3;
    }
    /**
     * <code>string ce_string = 3;</code>
     * @return The ceString.
     */
    public String getCeString() {
      Object ref = "";
      if (attrCase_ == 3) {
        ref = attr_;
      }
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (attrCase_ == 3) {
          attr_ = s;
        }
        return s;
      }
    }
    /**
     * <code>string ce_string = 3;</code>
     * @return The bytes for ceString.
     */
    public com.google.protobuf.ByteString
        getCeStringBytes() {
      Object ref = "";
      if (attrCase_ == 3) {
        ref = attr_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        if (attrCase_ == 3) {
          attr_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int CE_BYTES_FIELD_NUMBER = 4;
    /**
     * <code>bytes ce_bytes = 4;</code>
     * @return Whether the ceBytes field is set.
     */
    @Override
    public boolean hasCeBytes() {
      return attrCase_ == 4;
    }
    /**
     * <code>bytes ce_bytes = 4;</code>
     * @return The ceBytes.
     */
    @Override
    public com.google.protobuf.ByteString getCeBytes() {
      if (attrCase_ == 4) {
        return (com.google.protobuf.ByteString) attr_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }

    public static final int CE_URI_FIELD_NUMBER = 5;
    /**
     * <code>string ce_uri = 5;</code>
     * @return Whether the ceUri field is set.
     */
    public boolean hasCeUri() {
      return attrCase_ == 5;
    }
    /**
     * <code>string ce_uri = 5;</code>
     * @return The ceUri.
     */
    public String getCeUri() {
      Object ref = "";
      if (attrCase_ == 5) {
        ref = attr_;
      }
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (attrCase_ == 5) {
          attr_ = s;
        }
        return s;
      }
    }
    /**
     * <code>string ce_uri = 5;</code>
     * @return The bytes for ceUri.
     */
    public com.google.protobuf.ByteString
        getCeUriBytes() {
      Object ref = "";
      if (attrCase_ == 5) {
        ref = attr_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        if (attrCase_ == 5) {
          attr_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int CE_URI_REF_FIELD_NUMBER = 6;
    /**
     * <code>string ce_uri_ref = 6;</code>
     * @return Whether the ceUriRef field is set.
     */
    public boolean hasCeUriRef() {
      return attrCase_ == 6;
    }
    /**
     * <code>string ce_uri_ref = 6;</code>
     * @return The ceUriRef.
     */
    public String getCeUriRef() {
      Object ref = "";
      if (attrCase_ == 6) {
        ref = attr_;
      }
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (attrCase_ == 6) {
          attr_ = s;
        }
        return s;
      }
    }
    /**
     * <code>string ce_uri_ref = 6;</code>
     * @return The bytes for ceUriRef.
     */
    public com.google.protobuf.ByteString
        getCeUriRefBytes() {
      Object ref = "";
      if (attrCase_ == 6) {
        ref = attr_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        if (attrCase_ == 6) {
          attr_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int CE_TIMESTAMP_FIELD_NUMBER = 7;
    /**
     * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
     * @return Whether the ceTimestamp field is set.
     */
    @Override
    public boolean hasCeTimestamp() {
      return attrCase_ == 7;
    }
    /**
     * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
     * @return The ceTimestamp.
     */
    @Override
    public com.google.protobuf.Timestamp getCeTimestamp() {
      if (attrCase_ == 7) {
         return (com.google.protobuf.Timestamp) attr_;
      }
      return com.google.protobuf.Timestamp.getDefaultInstance();
    }
    /**
     * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
     */
    @Override
    public com.google.protobuf.TimestampOrBuilder getCeTimestampOrBuilder() {
      if (attrCase_ == 7) {
         return (com.google.protobuf.Timestamp) attr_;
      }
      return com.google.protobuf.Timestamp.getDefaultInstance();
    }

    private byte memoizedIsInitialized = -1;
    @Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (attrCase_ == 1) {
        output.writeBool(
            1, (boolean)((Boolean) attr_));
      }
      if (attrCase_ == 2) {
        output.writeInt32(
            2, (int)((Integer) attr_));
      }
      if (attrCase_ == 3) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, attr_);
      }
      if (attrCase_ == 4) {
        output.writeBytes(
            4, (com.google.protobuf.ByteString) attr_);
      }
      if (attrCase_ == 5) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, attr_);
      }
      if (attrCase_ == 6) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 6, attr_);
      }
      if (attrCase_ == 7) {
        output.writeMessage(7, (com.google.protobuf.Timestamp) attr_);
      }
      unknownFields.writeTo(output);
    }

    @Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (attrCase_ == 1) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(
              1, (boolean)((Boolean) attr_));
      }
      if (attrCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(
              2, (int)((Integer) attr_));
      }
      if (attrCase_ == 3) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, attr_);
      }
      if (attrCase_ == 4) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(
              4, (com.google.protobuf.ByteString) attr_);
      }
      if (attrCase_ == 5) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, attr_);
      }
      if (attrCase_ == 6) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, attr_);
      }
      if (attrCase_ == 7) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(7, (com.google.protobuf.Timestamp) attr_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof CloudEventAttributeValue)) {
        return super.equals(obj);
      }
      CloudEventAttributeValue other = (CloudEventAttributeValue) obj;

      if (!getAttrCase().equals(other.getAttrCase())) return false;
      switch (attrCase_) {
        case 1:
          if (getCeBoolean()
              != other.getCeBoolean()) return false;
          break;
        case 2:
          if (getCeInteger()
              != other.getCeInteger()) return false;
          break;
        case 3:
          if (!getCeString()
              .equals(other.getCeString())) return false;
          break;
        case 4:
          if (!getCeBytes()
              .equals(other.getCeBytes())) return false;
          break;
        case 5:
          if (!getCeUri()
              .equals(other.getCeUri())) return false;
          break;
        case 6:
          if (!getCeUriRef()
              .equals(other.getCeUriRef())) return false;
          break;
        case 7:
          if (!getCeTimestamp()
              .equals(other.getCeTimestamp())) return false;
          break;
        case 0:
        default:
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      switch (attrCase_) {
        case 1:
          hash = (37 * hash) + CE_BOOLEAN_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
              getCeBoolean());
          break;
        case 2:
          hash = (37 * hash) + CE_INTEGER_FIELD_NUMBER;
          hash = (53 * hash) + getCeInteger();
          break;
        case 3:
          hash = (37 * hash) + CE_STRING_FIELD_NUMBER;
          hash = (53 * hash) + getCeString().hashCode();
          break;
        case 4:
          hash = (37 * hash) + CE_BYTES_FIELD_NUMBER;
          hash = (53 * hash) + getCeBytes().hashCode();
          break;
        case 5:
          hash = (37 * hash) + CE_URI_FIELD_NUMBER;
          hash = (53 * hash) + getCeUri().hashCode();
          break;
        case 6:
          hash = (37 * hash) + CE_URI_REF_FIELD_NUMBER;
          hash = (53 * hash) + getCeUriRef().hashCode();
          break;
        case 7:
          hash = (37 * hash) + CE_TIMESTAMP_FIELD_NUMBER;
          hash = (53 * hash) + getCeTimestamp().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static CloudEventAttributeValue parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static CloudEventAttributeValue parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static CloudEventAttributeValue parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static CloudEventAttributeValue parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static CloudEventAttributeValue parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static CloudEventAttributeValue parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static CloudEventAttributeValue parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static CloudEventAttributeValue parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static CloudEventAttributeValue parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static CloudEventAttributeValue parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static CloudEventAttributeValue parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static CloudEventAttributeValue parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(CloudEventAttributeValue prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue)
        CloudEventAttributeValueOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_CloudEventAttributeValue_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_CloudEventAttributeValue_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                CloudEventAttributeValue.class, Builder.class);
      }

      // Construct using org.apache.eventmesh.common.protocol.grpc.cloudevents.CloudEvent.CloudEventAttributeValue.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @Override
      public Builder clear() {
        super.clear();
        attrCase_ = 0;
        attr_ = null;
        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_CloudEventAttributeValue_descriptor;
      }

      @Override
      public CloudEventAttributeValue getDefaultInstanceForType() {
        return CloudEventAttributeValue.getDefaultInstance();
      }

      @Override
      public CloudEventAttributeValue build() {
        CloudEventAttributeValue result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public CloudEventAttributeValue buildPartial() {
        CloudEventAttributeValue result = new CloudEventAttributeValue(this);
        if (attrCase_ == 1) {
          result.attr_ = attr_;
        }
        if (attrCase_ == 2) {
          result.attr_ = attr_;
        }
        if (attrCase_ == 3) {
          result.attr_ = attr_;
        }
        if (attrCase_ == 4) {
          result.attr_ = attr_;
        }
        if (attrCase_ == 5) {
          result.attr_ = attr_;
        }
        if (attrCase_ == 6) {
          result.attr_ = attr_;
        }
        if (attrCase_ == 7) {
          if (ceTimestampBuilder_ == null) {
            result.attr_ = attr_;
          } else {
            result.attr_ = ceTimestampBuilder_.build();
          }
        }
        result.attrCase_ = attrCase_;
        onBuilt();
        return result;
      }

      @Override
      public Builder clone() {
        return super.clone();
      }
      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.setField(field, value);
      }
      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.addRepeatedField(field, value);
      }
      @Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof CloudEventAttributeValue) {
          return mergeFrom((CloudEventAttributeValue)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(CloudEventAttributeValue other) {
        if (other == CloudEventAttributeValue.getDefaultInstance()) return this;
        switch (other.getAttrCase()) {
          case CE_BOOLEAN: {
            setCeBoolean(other.getCeBoolean());
            break;
          }
          case CE_INTEGER: {
            setCeInteger(other.getCeInteger());
            break;
          }
          case CE_STRING: {
            attrCase_ = 3;
            attr_ = other.attr_;
            onChanged();
            break;
          }
          case CE_BYTES: {
            setCeBytes(other.getCeBytes());
            break;
          }
          case CE_URI: {
            attrCase_ = 5;
            attr_ = other.attr_;
            onChanged();
            break;
          }
          case CE_URI_REF: {
            attrCase_ = 6;
            attr_ = other.attr_;
            onChanged();
            break;
          }
          case CE_TIMESTAMP: {
            mergeCeTimestamp(other.getCeTimestamp());
            break;
          }
          case ATTR_NOT_SET: {
            break;
          }
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @Override
      public final boolean isInitialized() {
        return true;
      }

      @Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        CloudEventAttributeValue parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (CloudEventAttributeValue) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int attrCase_ = 0;
      private Object attr_;
      public AttrCase
          getAttrCase() {
        return AttrCase.forNumber(
            attrCase_);
      }

      public Builder clearAttr() {
        attrCase_ = 0;
        attr_ = null;
        onChanged();
        return this;
      }


      /**
       * <code>bool ce_boolean = 1;</code>
       * @return Whether the ceBoolean field is set.
       */
      public boolean hasCeBoolean() {
        return attrCase_ == 1;
      }
      /**
       * <code>bool ce_boolean = 1;</code>
       * @return The ceBoolean.
       */
      public boolean getCeBoolean() {
        if (attrCase_ == 1) {
          return (Boolean) attr_;
        }
        return false;
      }
      /**
       * <code>bool ce_boolean = 1;</code>
       * @param value The ceBoolean to set.
       * @return This builder for chaining.
       */
      public Builder setCeBoolean(boolean value) {
        attrCase_ = 1;
        attr_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>bool ce_boolean = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearCeBoolean() {
        if (attrCase_ == 1) {
          attrCase_ = 0;
          attr_ = null;
          onChanged();
        }
        return this;
      }

      /**
       * <code>int32 ce_integer = 2;</code>
       * @return Whether the ceInteger field is set.
       */
      public boolean hasCeInteger() {
        return attrCase_ == 2;
      }
      /**
       * <code>int32 ce_integer = 2;</code>
       * @return The ceInteger.
       */
      public int getCeInteger() {
        if (attrCase_ == 2) {
          return (Integer) attr_;
        }
        return 0;
      }
      /**
       * <code>int32 ce_integer = 2;</code>
       * @param value The ceInteger to set.
       * @return This builder for chaining.
       */
      public Builder setCeInteger(int value) {
        attrCase_ = 2;
        attr_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 ce_integer = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearCeInteger() {
        if (attrCase_ == 2) {
          attrCase_ = 0;
          attr_ = null;
          onChanged();
        }
        return this;
      }

      /**
       * <code>string ce_string = 3;</code>
       * @return Whether the ceString field is set.
       */
      @Override
      public boolean hasCeString() {
        return attrCase_ == 3;
      }
      /**
       * <code>string ce_string = 3;</code>
       * @return The ceString.
       */
      @Override
      public String getCeString() {
        Object ref = "";
        if (attrCase_ == 3) {
          ref = attr_;
        }
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          if (attrCase_ == 3) {
            attr_ = s;
          }
          return s;
        } else {
          return (String) ref;
        }
      }
      /**
       * <code>string ce_string = 3;</code>
       * @return The bytes for ceString.
       */
      @Override
      public com.google.protobuf.ByteString
          getCeStringBytes() {
        Object ref = "";
        if (attrCase_ == 3) {
          ref = attr_;
        }
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          if (attrCase_ == 3) {
            attr_ = b;
          }
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string ce_string = 3;</code>
       * @param value The ceString to set.
       * @return This builder for chaining.
       */
      public Builder setCeString(
          String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  attrCase_ = 3;
        attr_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string ce_string = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearCeString() {
        if (attrCase_ == 3) {
          attrCase_ = 0;
          attr_ = null;
          onChanged();
        }
        return this;
      }
      /**
       * <code>string ce_string = 3;</code>
       * @param value The bytes for ceString to set.
       * @return This builder for chaining.
       */
      public Builder setCeStringBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        attrCase_ = 3;
        attr_ = value;
        onChanged();
        return this;
      }

      /**
       * <code>bytes ce_bytes = 4;</code>
       * @return Whether the ceBytes field is set.
       */
      public boolean hasCeBytes() {
        return attrCase_ == 4;
      }
      /**
       * <code>bytes ce_bytes = 4;</code>
       * @return The ceBytes.
       */
      public com.google.protobuf.ByteString getCeBytes() {
        if (attrCase_ == 4) {
          return (com.google.protobuf.ByteString) attr_;
        }
        return com.google.protobuf.ByteString.EMPTY;
      }
      /**
       * <code>bytes ce_bytes = 4;</code>
       * @param value The ceBytes to set.
       * @return This builder for chaining.
       */
      public Builder setCeBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  attrCase_ = 4;
        attr_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>bytes ce_bytes = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearCeBytes() {
        if (attrCase_ == 4) {
          attrCase_ = 0;
          attr_ = null;
          onChanged();
        }
        return this;
      }

      /**
       * <code>string ce_uri = 5;</code>
       * @return Whether the ceUri field is set.
       */
      @Override
      public boolean hasCeUri() {
        return attrCase_ == 5;
      }
      /**
       * <code>string ce_uri = 5;</code>
       * @return The ceUri.
       */
      @Override
      public String getCeUri() {
        Object ref = "";
        if (attrCase_ == 5) {
          ref = attr_;
        }
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          if (attrCase_ == 5) {
            attr_ = s;
          }
          return s;
        } else {
          return (String) ref;
        }
      }
      /**
       * <code>string ce_uri = 5;</code>
       * @return The bytes for ceUri.
       */
      @Override
      public com.google.protobuf.ByteString
          getCeUriBytes() {
        Object ref = "";
        if (attrCase_ == 5) {
          ref = attr_;
        }
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          if (attrCase_ == 5) {
            attr_ = b;
          }
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string ce_uri = 5;</code>
       * @param value The ceUri to set.
       * @return This builder for chaining.
       */
      public Builder setCeUri(
          String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  attrCase_ = 5;
        attr_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string ce_uri = 5;</code>
       * @return This builder for chaining.
       */
      public Builder clearCeUri() {
        if (attrCase_ == 5) {
          attrCase_ = 0;
          attr_ = null;
          onChanged();
        }
        return this;
      }
      /**
       * <code>string ce_uri = 5;</code>
       * @param value The bytes for ceUri to set.
       * @return This builder for chaining.
       */
      public Builder setCeUriBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        attrCase_ = 5;
        attr_ = value;
        onChanged();
        return this;
      }

      /**
       * <code>string ce_uri_ref = 6;</code>
       * @return Whether the ceUriRef field is set.
       */
      @Override
      public boolean hasCeUriRef() {
        return attrCase_ == 6;
      }
      /**
       * <code>string ce_uri_ref = 6;</code>
       * @return The ceUriRef.
       */
      @Override
      public String getCeUriRef() {
        Object ref = "";
        if (attrCase_ == 6) {
          ref = attr_;
        }
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          if (attrCase_ == 6) {
            attr_ = s;
          }
          return s;
        } else {
          return (String) ref;
        }
      }
      /**
       * <code>string ce_uri_ref = 6;</code>
       * @return The bytes for ceUriRef.
       */
      @Override
      public com.google.protobuf.ByteString
          getCeUriRefBytes() {
        Object ref = "";
        if (attrCase_ == 6) {
          ref = attr_;
        }
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          if (attrCase_ == 6) {
            attr_ = b;
          }
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string ce_uri_ref = 6;</code>
       * @param value The ceUriRef to set.
       * @return This builder for chaining.
       */
      public Builder setCeUriRef(
          String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  attrCase_ = 6;
        attr_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string ce_uri_ref = 6;</code>
       * @return This builder for chaining.
       */
      public Builder clearCeUriRef() {
        if (attrCase_ == 6) {
          attrCase_ = 0;
          attr_ = null;
          onChanged();
        }
        return this;
      }
      /**
       * <code>string ce_uri_ref = 6;</code>
       * @param value The bytes for ceUriRef to set.
       * @return This builder for chaining.
       */
      public Builder setCeUriRefBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        attrCase_ = 6;
        attr_ = value;
        onChanged();
        return this;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> ceTimestampBuilder_;
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       * @return Whether the ceTimestamp field is set.
       */
      @Override
      public boolean hasCeTimestamp() {
        return attrCase_ == 7;
      }
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       * @return The ceTimestamp.
       */
      @Override
      public com.google.protobuf.Timestamp getCeTimestamp() {
        if (ceTimestampBuilder_ == null) {
          if (attrCase_ == 7) {
            return (com.google.protobuf.Timestamp) attr_;
          }
          return com.google.protobuf.Timestamp.getDefaultInstance();
        } else {
          if (attrCase_ == 7) {
            return ceTimestampBuilder_.getMessage();
          }
          return com.google.protobuf.Timestamp.getDefaultInstance();
        }
      }
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       */
      public Builder setCeTimestamp(com.google.protobuf.Timestamp value) {
        if (ceTimestampBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          attr_ = value;
          onChanged();
        } else {
          ceTimestampBuilder_.setMessage(value);
        }
        attrCase_ = 7;
        return this;
      }
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       */
      public Builder setCeTimestamp(
          com.google.protobuf.Timestamp.Builder builderForValue) {
        if (ceTimestampBuilder_ == null) {
          attr_ = builderForValue.build();
          onChanged();
        } else {
          ceTimestampBuilder_.setMessage(builderForValue.build());
        }
        attrCase_ = 7;
        return this;
      }
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       */
      public Builder mergeCeTimestamp(com.google.protobuf.Timestamp value) {
        if (ceTimestampBuilder_ == null) {
          if (attrCase_ == 7 &&
              attr_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
            attr_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) attr_)
                .mergeFrom(value).buildPartial();
          } else {
            attr_ = value;
          }
          onChanged();
        } else {
          if (attrCase_ == 7) {
            ceTimestampBuilder_.mergeFrom(value);
          } else {
            ceTimestampBuilder_.setMessage(value);
          }
        }
        attrCase_ = 7;
        return this;
      }
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       */
      public Builder clearCeTimestamp() {
        if (ceTimestampBuilder_ == null) {
          if (attrCase_ == 7) {
            attrCase_ = 0;
            attr_ = null;
            onChanged();
          }
        } else {
          if (attrCase_ == 7) {
            attrCase_ = 0;
            attr_ = null;
          }
          ceTimestampBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       */
      public com.google.protobuf.Timestamp.Builder getCeTimestampBuilder() {
        return getCeTimestampFieldBuilder().getBuilder();
      }
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       */
      @Override
      public com.google.protobuf.TimestampOrBuilder getCeTimestampOrBuilder() {
        if ((attrCase_ == 7) && (ceTimestampBuilder_ != null)) {
          return ceTimestampBuilder_.getMessageOrBuilder();
        } else {
          if (attrCase_ == 7) {
            return (com.google.protobuf.Timestamp) attr_;
          }
          return com.google.protobuf.Timestamp.getDefaultInstance();
        }
      }
      /**
       * <code>.google.protobuf.Timestamp ce_timestamp = 7;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
          getCeTimestampFieldBuilder() {
        if (ceTimestampBuilder_ == null) {
          if (!(attrCase_ == 7)) {
            attr_ = com.google.protobuf.Timestamp.getDefaultInstance();
          }
          ceTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                  (com.google.protobuf.Timestamp) attr_,
                  getParentForChildren(),
                  isClean());
          attr_ = null;
        }
        attrCase_ = 7;
        onChanged();;
        return ceTimestampBuilder_;
      }
      @Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue)
    }

    // @@protoc_insertion_point(class_scope:org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue)
    private static final CloudEventAttributeValue DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new CloudEventAttributeValue();
    }

    public static CloudEventAttributeValue getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<CloudEventAttributeValue>
        PARSER = new com.google.protobuf.AbstractParser<CloudEventAttributeValue>() {
      @Override
      public CloudEventAttributeValue parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new CloudEventAttributeValue(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<CloudEventAttributeValue> parser() {
      return PARSER;
    }

    @Override
    public com.google.protobuf.Parser<CloudEventAttributeValue> getParserForType() {
      return PARSER;
    }

    @Override
    public CloudEventAttributeValue getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int dataCase_ = 0;
  private Object data_;
  public enum DataCase
      implements com.google.protobuf.Internal.EnumLite,
          InternalOneOfEnum {
    BINARY_DATA(6),
    TEXT_DATA(7),
    PROTO_DATA(8),
    DATA_NOT_SET(0);
    private final int value;
    private DataCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @Deprecated
    public static DataCase valueOf(int value) {
      return forNumber(value);
    }

    public static DataCase forNumber(int value) {
      switch (value) {
        case 6: return BINARY_DATA;
        case 7: return TEXT_DATA;
        case 8: return PROTO_DATA;
        case 0: return DATA_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public DataCase
  getDataCase() {
    return DataCase.forNumber(
        dataCase_);
  }

  public static final int ID_FIELD_NUMBER = 1;
  private volatile Object id_;
  /**
   * <pre>
   * Required Attributes
   * </pre>
   *
   * <code>string id = 1;</code>
   * @return The id.
   */
  @Override
  public String getId() {
    Object ref = id_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      id_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Required Attributes
   * </pre>
   *
   * <code>string id = 1;</code>
   * @return The bytes for id.
   */
  @Override
  public com.google.protobuf.ByteString
      getIdBytes() {
    Object ref = id_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      id_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SOURCE_FIELD_NUMBER = 2;
  private volatile Object source_;
  /**
   * <pre>
   * URI-reference
   * </pre>
   *
   * <code>string source = 2;</code>
   * @return The source.
   */
  @Override
  public String getSource() {
    Object ref = source_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      source_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * URI-reference
   * </pre>
   *
   * <code>string source = 2;</code>
   * @return The bytes for source.
   */
  @Override
  public com.google.protobuf.ByteString
      getSourceBytes() {
    Object ref = source_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      source_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SPEC_VERSION_FIELD_NUMBER = 3;
  private volatile Object specVersion_;
  /**
   * <code>string spec_version = 3;</code>
   * @return The specVersion.
   */
  @Override
  public String getSpecVersion() {
    Object ref = specVersion_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      specVersion_ = s;
      return s;
    }
  }
  /**
   * <code>string spec_version = 3;</code>
   * @return The bytes for specVersion.
   */
  @Override
  public com.google.protobuf.ByteString
      getSpecVersionBytes() {
    Object ref = specVersion_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      specVersion_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TYPE_FIELD_NUMBER = 4;
  private volatile Object type_;
  /**
   * <code>string type = 4;</code>
   * @return The type.
   */
  @Override
  public String getType() {
    Object ref = type_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      type_ = s;
      return s;
    }
  }
  /**
   * <code>string type = 4;</code>
   * @return The bytes for type.
   */
  @Override
  public com.google.protobuf.ByteString
      getTypeBytes() {
    Object ref = type_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      type_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ATTRIBUTES_FIELD_NUMBER = 5;
  private static final class AttributesDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        String, CloudEventAttributeValue> defaultEntry =
            com.google.protobuf.MapEntry
            .<String, CloudEventAttributeValue>newDefaultInstance(
                EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_AttributesEntry_descriptor,
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.MESSAGE,
                CloudEventAttributeValue.getDefaultInstance());
  }
  private com.google.protobuf.MapField<
      String, CloudEventAttributeValue> attributes_;
  private com.google.protobuf.MapField<String, CloudEventAttributeValue>
  internalGetAttributes() {
    if (attributes_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          AttributesDefaultEntryHolder.defaultEntry);
    }
    return attributes_;
  }

  public int getAttributesCount() {
    return internalGetAttributes().getMap().size();
  }
  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */

  @Override
  public boolean containsAttributes(
      String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetAttributes().getMap().containsKey(key);
  }
  /**
   * Use {@link #getAttributesMap()} instead.
   */
  @Override
  @Deprecated
  public java.util.Map<String, CloudEventAttributeValue> getAttributes() {
    return getAttributesMap();
  }
  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */
  @Override

  public java.util.Map<String, CloudEventAttributeValue> getAttributesMap() {
    return internalGetAttributes().getMap();
  }
  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */
  @Override

  public CloudEventAttributeValue getAttributesOrDefault(
      String key,
      CloudEventAttributeValue defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map<String, CloudEventAttributeValue> map =
        internalGetAttributes().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */
  @Override

  public CloudEventAttributeValue getAttributesOrThrow(
      String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map<String, CloudEventAttributeValue> map =
        internalGetAttributes().getMap();
    if (!map.containsKey(key)) {
      throw new IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int BINARY_DATA_FIELD_NUMBER = 6;
  /**
   * <code>bytes binary_data = 6;</code>
   * @return Whether the binaryData field is set.
   */
  @Override
  public boolean hasBinaryData() {
    return dataCase_ == 6;
  }
  /**
   * <code>bytes binary_data = 6;</code>
   * @return The binaryData.
   */
  @Override
  public com.google.protobuf.ByteString getBinaryData() {
    if (dataCase_ == 6) {
      return (com.google.protobuf.ByteString) data_;
    }
    return com.google.protobuf.ByteString.EMPTY;
  }

  public static final int TEXT_DATA_FIELD_NUMBER = 7;
  /**
   * <code>string text_data = 7;</code>
   * @return Whether the textData field is set.
   */
  public boolean hasTextData() {
    return dataCase_ == 7;
  }
  /**
   * <code>string text_data = 7;</code>
   * @return The textData.
   */
  public String getTextData() {
    Object ref = "";
    if (dataCase_ == 7) {
      ref = data_;
    }
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      if (dataCase_ == 7) {
        data_ = s;
      }
      return s;
    }
  }
  /**
   * <code>string text_data = 7;</code>
   * @return The bytes for textData.
   */
  public com.google.protobuf.ByteString
      getTextDataBytes() {
    Object ref = "";
    if (dataCase_ == 7) {
      ref = data_;
    }
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      if (dataCase_ == 7) {
        data_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PROTO_DATA_FIELD_NUMBER = 8;
  /**
   * <code>.google.protobuf.Any proto_data = 8;</code>
   * @return Whether the protoData field is set.
   */
  @Override
  public boolean hasProtoData() {
    return dataCase_ == 8;
  }
  /**
   * <code>.google.protobuf.Any proto_data = 8;</code>
   * @return The protoData.
   */
  @Override
  public com.google.protobuf.Any getProtoData() {
    if (dataCase_ == 8) {
       return (com.google.protobuf.Any) data_;
    }
    return com.google.protobuf.Any.getDefaultInstance();
  }
  /**
   * <code>.google.protobuf.Any proto_data = 8;</code>
   */
  @Override
  public com.google.protobuf.AnyOrBuilder getProtoDataOrBuilder() {
    if (dataCase_ == 8) {
       return (com.google.protobuf.Any) data_;
    }
    return com.google.protobuf.Any.getDefaultInstance();
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specVersion_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, specVersion_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetAttributes(),
        AttributesDefaultEntryHolder.defaultEntry,
        5);
    if (dataCase_ == 6) {
      output.writeBytes(
          6, (com.google.protobuf.ByteString) data_);
    }
    if (dataCase_ == 7) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, data_);
    }
    if (dataCase_ == 8) {
      output.writeMessage(8, (com.google.protobuf.Any) data_);
    }
    unknownFields.writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specVersion_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, specVersion_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_);
    }
    for (java.util.Map.Entry<String, CloudEventAttributeValue> entry
         : internalGetAttributes().getMap().entrySet()) {
      com.google.protobuf.MapEntry<String, CloudEventAttributeValue>
      attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, attributes__);
    }
    if (dataCase_ == 6) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(
            6, (com.google.protobuf.ByteString) data_);
    }
    if (dataCase_ == 7) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, data_);
    }
    if (dataCase_ == 8) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, (com.google.protobuf.Any) data_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof CloudEvent)) {
      return super.equals(obj);
    }
    CloudEvent other = (CloudEvent) obj;

    if (!getId()
        .equals(other.getId())) return false;
    if (!getSource()
        .equals(other.getSource())) return false;
    if (!getSpecVersion()
        .equals(other.getSpecVersion())) return false;
    if (!getType()
        .equals(other.getType())) return false;
    if (!internalGetAttributes().equals(
        other.internalGetAttributes())) return false;
    if (!getDataCase().equals(other.getDataCase())) return false;
    switch (dataCase_) {
      case 6:
        if (!getBinaryData()
            .equals(other.getBinaryData())) return false;
        break;
      case 7:
        if (!getTextData()
            .equals(other.getTextData())) return false;
        break;
      case 8:
        if (!getProtoData()
            .equals(other.getProtoData())) return false;
        break;
      case 0:
      default:
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + ID_FIELD_NUMBER;
    hash = (53 * hash) + getId().hashCode();
    hash = (37 * hash) + SOURCE_FIELD_NUMBER;
    hash = (53 * hash) + getSource().hashCode();
    hash = (37 * hash) + SPEC_VERSION_FIELD_NUMBER;
    hash = (53 * hash) + getSpecVersion().hashCode();
    hash = (37 * hash) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getType().hashCode();
    if (!internalGetAttributes().getMap().isEmpty()) {
      hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER;
      hash = (53 * hash) + internalGetAttributes().hashCode();
    }
    switch (dataCase_) {
      case 6:
        hash = (37 * hash) + BINARY_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getBinaryData().hashCode();
        break;
      case 7:
        hash = (37 * hash) + TEXT_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getTextData().hashCode();
        break;
      case 8:
        hash = (37 * hash) + PROTO_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getProtoData().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static CloudEvent parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static CloudEvent parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static CloudEvent parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static CloudEvent parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static CloudEvent parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static CloudEvent parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static CloudEvent parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static CloudEvent parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static CloudEvent parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static CloudEvent parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static CloudEvent parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static CloudEvent parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(CloudEvent prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code org.apache.eventmesh.cloudevents.v1.CloudEvent}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:org.apache.eventmesh.cloudevents.v1.CloudEvent)
      CloudEventOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 5:
          return internalGetAttributes();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 5:
          return internalGetMutableAttributes();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              CloudEvent.class, Builder.class);
    }

    // Construct using org.apache.eventmesh.common.protocol.grpc.cloudevents.CloudEvent.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      id_ = "";

      source_ = "";

      specVersion_ = "";

      type_ = "";

      internalGetMutableAttributes().clear();
      dataCase_ = 0;
      data_ = null;
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return EventMeshCloudEvents.internal_static_org_apache_eventmesh_cloudevents_v1_CloudEvent_descriptor;
    }

    @Override
    public CloudEvent getDefaultInstanceForType() {
      return CloudEvent.getDefaultInstance();
    }

    @Override
    public CloudEvent build() {
      CloudEvent result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public CloudEvent buildPartial() {
      CloudEvent result = new CloudEvent(this);
      int from_bitField0_ = bitField0_;
      result.id_ = id_;
      result.source_ = source_;
      result.specVersion_ = specVersion_;
      result.type_ = type_;
      result.attributes_ = internalGetAttributes();
      result.attributes_.makeImmutable();
      if (dataCase_ == 6) {
        result.data_ = data_;
      }
      if (dataCase_ == 7) {
        result.data_ = data_;
      }
      if (dataCase_ == 8) {
        if (protoDataBuilder_ == null) {
          result.data_ = data_;
        } else {
          result.data_ = protoDataBuilder_.build();
        }
      }
      result.dataCase_ = dataCase_;
      onBuilt();
      return result;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof CloudEvent) {
        return mergeFrom((CloudEvent)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(CloudEvent other) {
      if (other == CloudEvent.getDefaultInstance()) return this;
      if (!other.getId().isEmpty()) {
        id_ = other.id_;
        onChanged();
      }
      if (!other.getSource().isEmpty()) {
        source_ = other.source_;
        onChanged();
      }
      if (!other.getSpecVersion().isEmpty()) {
        specVersion_ = other.specVersion_;
        onChanged();
      }
      if (!other.getType().isEmpty()) {
        type_ = other.type_;
        onChanged();
      }
      internalGetMutableAttributes().mergeFrom(
          other.internalGetAttributes());
      switch (other.getDataCase()) {
        case BINARY_DATA: {
          setBinaryData(other.getBinaryData());
          break;
        }
        case TEXT_DATA: {
          dataCase_ = 7;
          data_ = other.data_;
          onChanged();
          break;
        }
        case PROTO_DATA: {
          mergeProtoData(other.getProtoData());
          break;
        }
        case DATA_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      CloudEvent parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (CloudEvent) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int dataCase_ = 0;
    private Object data_;
    public DataCase
        getDataCase() {
      return DataCase.forNumber(
          dataCase_);
    }

    public Builder clearData() {
      dataCase_ = 0;
      data_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private Object id_ = "";
    /**
     * <pre>
     * Required Attributes
     * </pre>
     *
     * <code>string id = 1;</code>
     * @return The id.
     */
    public String getId() {
      Object ref = id_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        id_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <pre>
     * Required Attributes
     * </pre>
     *
     * <code>string id = 1;</code>
     * @return The bytes for id.
     */
    public com.google.protobuf.ByteString
        getIdBytes() {
      Object ref = id_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Required Attributes
     * </pre>
     *
     * <code>string id = 1;</code>
     * @param value The id to set.
     * @return This builder for chaining.
     */
    public Builder setId(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }

      id_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required Attributes
     * </pre>
     *
     * <code>string id = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearId() {

      id_ = getDefaultInstance().getId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required Attributes
     * </pre>
     *
     * <code>string id = 1;</code>
     * @param value The bytes for id to set.
     * @return This builder for chaining.
     */
    public Builder setIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

      id_ = value;
      onChanged();
      return this;
    }

    private Object source_ = "";
    /**
     * <pre>
     * URI-reference
     * </pre>
     *
     * <code>string source = 2;</code>
     * @return The source.
     */
    public String getSource() {
      Object ref = source_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        source_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <pre>
     * URI-reference
     * </pre>
     *
     * <code>string source = 2;</code>
     * @return The bytes for source.
     */
    public com.google.protobuf.ByteString
        getSourceBytes() {
      Object ref = source_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        source_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * URI-reference
     * </pre>
     *
     * <code>string source = 2;</code>
     * @param value The source to set.
     * @return This builder for chaining.
     */
    public Builder setSource(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }

      source_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * URI-reference
     * </pre>
     *
     * <code>string source = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearSource() {

      source_ = getDefaultInstance().getSource();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * URI-reference
     * </pre>
     *
     * <code>string source = 2;</code>
     * @param value The bytes for source to set.
     * @return This builder for chaining.
     */
    public Builder setSourceBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

      source_ = value;
      onChanged();
      return this;
    }

    private Object specVersion_ = "";
    /**
     * <code>string spec_version = 3;</code>
     * @return The specVersion.
     */
    public String getSpecVersion() {
      Object ref = specVersion_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        specVersion_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string spec_version = 3;</code>
     * @return The bytes for specVersion.
     */
    public com.google.protobuf.ByteString
        getSpecVersionBytes() {
      Object ref = specVersion_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        specVersion_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string spec_version = 3;</code>
     * @param value The specVersion to set.
     * @return This builder for chaining.
     */
    public Builder setSpecVersion(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }

      specVersion_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string spec_version = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearSpecVersion() {

      specVersion_ = getDefaultInstance().getSpecVersion();
      onChanged();
      return this;
    }
    /**
     * <code>string spec_version = 3;</code>
     * @param value The bytes for specVersion to set.
     * @return This builder for chaining.
     */
    public Builder setSpecVersionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

      specVersion_ = value;
      onChanged();
      return this;
    }

    private Object type_ = "";
    /**
     * <code>string type = 4;</code>
     * @return The type.
     */
    public String getType() {
      Object ref = type_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        type_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string type = 4;</code>
     * @return The bytes for type.
     */
    public com.google.protobuf.ByteString
        getTypeBytes() {
      Object ref = type_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        type_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string type = 4;</code>
     * @param value The type to set.
     * @return This builder for chaining.
     */
    public Builder setType(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }

      type_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string type = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearType() {

      type_ = getDefaultInstance().getType();
      onChanged();
      return this;
    }
    /**
     * <code>string type = 4;</code>
     * @param value The bytes for type to set.
     * @return This builder for chaining.
     */
    public Builder setTypeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

      type_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        String, CloudEventAttributeValue> attributes_;
    private com.google.protobuf.MapField<String, CloudEventAttributeValue>
    internalGetAttributes() {
      if (attributes_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            AttributesDefaultEntryHolder.defaultEntry);
      }
      return attributes_;
    }
    private com.google.protobuf.MapField<String, CloudEventAttributeValue>
    internalGetMutableAttributes() {
      onChanged();;
      if (attributes_ == null) {
        attributes_ = com.google.protobuf.MapField.newMapField(
            AttributesDefaultEntryHolder.defaultEntry);
      }
      if (!attributes_.isMutable()) {
        attributes_ = attributes_.copy();
      }
      return attributes_;
    }

    public int getAttributesCount() {
      return internalGetAttributes().getMap().size();
    }
    /**
     * <pre>
     * Optional &amp; Extension Attributes
     * </pre>
     *
     * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
     */

    @Override
    public boolean containsAttributes(
        String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetAttributes().getMap().containsKey(key);
    }
    /**
     * Use {@link #getAttributesMap()} instead.
     */
    @Override
    @Deprecated
    public java.util.Map<String, CloudEventAttributeValue> getAttributes() {
      return getAttributesMap();
    }
    /**
     * <pre>
     * Optional &amp; Extension Attributes
     * </pre>
     *
     * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
     */
    @Override

    public java.util.Map<String, CloudEventAttributeValue> getAttributesMap() {
      return internalGetAttributes().getMap();
    }
    /**
     * <pre>
     * Optional &amp; Extension Attributes
     * </pre>
     *
     * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
     */
    @Override

    public CloudEventAttributeValue getAttributesOrDefault(
        String key,
        CloudEventAttributeValue defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<String, CloudEventAttributeValue> map =
          internalGetAttributes().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     * Optional &amp; Extension Attributes
     * </pre>
     *
     * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
     */
    @Override

    public CloudEventAttributeValue getAttributesOrThrow(
        String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<String, CloudEventAttributeValue> map =
          internalGetAttributes().getMap();
      if (!map.containsKey(key)) {
        throw new IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearAttributes() {
      internalGetMutableAttributes().getMutableMap()
          .clear();
      return this;
    }
    /**
     * <pre>
     * Optional &amp; Extension Attributes
     * </pre>
     *
     * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
     */

    public Builder removeAttributes(
        String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableAttributes().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @Deprecated
    public java.util.Map<String, CloudEventAttributeValue>
    getMutableAttributes() {
      return internalGetMutableAttributes().getMutableMap();
    }
    /**
     * <pre>
     * Optional &amp; Extension Attributes
     * </pre>
     *
     * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
     */
    public Builder putAttributes(
        String key,
        CloudEventAttributeValue value) {
      if (key == null) { throw new NullPointerException("map key"); }
      if (value == null) {
  throw new NullPointerException("map value");
}

      internalGetMutableAttributes().getMutableMap()
          .put(key, value);
      return this;
    }
    /**
     * <pre>
     * Optional &amp; Extension Attributes
     * </pre>
     *
     * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
     */

    public Builder putAllAttributes(
        java.util.Map<String, CloudEventAttributeValue> values) {
      internalGetMutableAttributes().getMutableMap()
          .putAll(values);
      return this;
    }

    /**
     * <code>bytes binary_data = 6;</code>
     * @return Whether the binaryData field is set.
     */
    public boolean hasBinaryData() {
      return dataCase_ == 6;
    }
    /**
     * <code>bytes binary_data = 6;</code>
     * @return The binaryData.
     */
    public com.google.protobuf.ByteString getBinaryData() {
      if (dataCase_ == 6) {
        return (com.google.protobuf.ByteString) data_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }
    /**
     * <code>bytes binary_data = 6;</code>
     * @param value The binaryData to set.
     * @return This builder for chaining.
     */
    public Builder setBinaryData(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  dataCase_ = 6;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bytes binary_data = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearBinaryData() {
      if (dataCase_ == 6) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>string text_data = 7;</code>
     * @return Whether the textData field is set.
     */
    @Override
    public boolean hasTextData() {
      return dataCase_ == 7;
    }
    /**
     * <code>string text_data = 7;</code>
     * @return The textData.
     */
    @Override
    public String getTextData() {
      Object ref = "";
      if (dataCase_ == 7) {
        ref = data_;
      }
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (dataCase_ == 7) {
          data_ = s;
        }
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string text_data = 7;</code>
     * @return The bytes for textData.
     */
    @Override
    public com.google.protobuf.ByteString
        getTextDataBytes() {
      Object ref = "";
      if (dataCase_ == 7) {
        ref = data_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        if (dataCase_ == 7) {
          data_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string text_data = 7;</code>
     * @param value The textData to set.
     * @return This builder for chaining.
     */
    public Builder setTextData(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  dataCase_ = 7;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string text_data = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearTextData() {
      if (dataCase_ == 7) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * <code>string text_data = 7;</code>
     * @param value The bytes for textData to set.
     * @return This builder for chaining.
     */
    public Builder setTextDataBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      dataCase_ = 7;
      data_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> protoDataBuilder_;
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     * @return Whether the protoData field is set.
     */
    @Override
    public boolean hasProtoData() {
      return dataCase_ == 8;
    }
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     * @return The protoData.
     */
    @Override
    public com.google.protobuf.Any getProtoData() {
      if (protoDataBuilder_ == null) {
        if (dataCase_ == 8) {
          return (com.google.protobuf.Any) data_;
        }
        return com.google.protobuf.Any.getDefaultInstance();
      } else {
        if (dataCase_ == 8) {
          return protoDataBuilder_.getMessage();
        }
        return com.google.protobuf.Any.getDefaultInstance();
      }
    }
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     */
    public Builder setProtoData(com.google.protobuf.Any value) {
      if (protoDataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        data_ = value;
        onChanged();
      } else {
        protoDataBuilder_.setMessage(value);
      }
      dataCase_ = 8;
      return this;
    }
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     */
    public Builder setProtoData(
        com.google.protobuf.Any.Builder builderForValue) {
      if (protoDataBuilder_ == null) {
        data_ = builderForValue.build();
        onChanged();
      } else {
        protoDataBuilder_.setMessage(builderForValue.build());
      }
      dataCase_ = 8;
      return this;
    }
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     */
    public Builder mergeProtoData(com.google.protobuf.Any value) {
      if (protoDataBuilder_ == null) {
        if (dataCase_ == 8 &&
            data_ != com.google.protobuf.Any.getDefaultInstance()) {
          data_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) data_)
              .mergeFrom(value).buildPartial();
        } else {
          data_ = value;
        }
        onChanged();
      } else {
        if (dataCase_ == 8) {
          protoDataBuilder_.mergeFrom(value);
        } else {
          protoDataBuilder_.setMessage(value);
        }
      }
      dataCase_ = 8;
      return this;
    }
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     */
    public Builder clearProtoData() {
      if (protoDataBuilder_ == null) {
        if (dataCase_ == 8) {
          dataCase_ = 0;
          data_ = null;
          onChanged();
        }
      } else {
        if (dataCase_ == 8) {
          dataCase_ = 0;
          data_ = null;
        }
        protoDataBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     */
    public com.google.protobuf.Any.Builder getProtoDataBuilder() {
      return getProtoDataFieldBuilder().getBuilder();
    }
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     */
    @Override
    public com.google.protobuf.AnyOrBuilder getProtoDataOrBuilder() {
      if ((dataCase_ == 8) && (protoDataBuilder_ != null)) {
        return protoDataBuilder_.getMessageOrBuilder();
      } else {
        if (dataCase_ == 8) {
          return (com.google.protobuf.Any) data_;
        }
        return com.google.protobuf.Any.getDefaultInstance();
      }
    }
    /**
     * <code>.google.protobuf.Any proto_data = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
        getProtoDataFieldBuilder() {
      if (protoDataBuilder_ == null) {
        if (!(dataCase_ == 8)) {
          data_ = com.google.protobuf.Any.getDefaultInstance();
        }
        protoDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
                (com.google.protobuf.Any) data_,
                getParentForChildren(),
                isClean());
        data_ = null;
      }
      dataCase_ = 8;
      onChanged();;
      return protoDataBuilder_;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:org.apache.eventmesh.cloudevents.v1.CloudEvent)
  }

  // @@protoc_insertion_point(class_scope:org.apache.eventmesh.cloudevents.v1.CloudEvent)
  private static final CloudEvent DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new CloudEvent();
  }

  public static CloudEvent getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<CloudEvent>
      PARSER = new com.google.protobuf.AbstractParser<CloudEvent>() {
    @Override
    public CloudEvent parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new CloudEvent(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<CloudEvent> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<CloudEvent> getParserForType() {
    return PARSER;
  }

  @Override
  public CloudEvent getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

